package 代码记录.Bit48天集训;


import java.io.*;

public class Test {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream objectOutputStream = new ObjectOutputStream( new FileOutputStream("D:\\text.out"));
        Student student = new Student();
        student.setAge(25);
        student.setName("jayWei");
        objectOutputStream.writeObject(student);

        objectOutputStream.flush();
        objectOutputStream.close();
    }

}
class Student  {
    private Integer age;
    private String name;
    public Teacher number;
    public Integer getAge() {
        return age;
    }
    public void setAge(Integer age) {
        this.age = age;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Teacher getNumber(){
        return number;
    }
    public void setNumber(Teacher number){
        this.number = number;
    }
}
class Teacher{
    public String name;
}